Skip to content

tiup: clarify limits.conf behavior in no-sudo mode - #21729

Open
doc-claw-bot wants to merge 9 commits into
pingcap:masterfrom
doc-claw-bot:docs/nosudo-limits-user-manager
Open

tiup: clarify limits.conf behavior in no-sudo mode#21729
doc-claw-bot wants to merge 9 commits into
pingcap:masterfrom
doc-claw-bot:docs/nosudo-limits-user-manager

Conversation

@doc-claw-bot

@doc-claw-bot doc-claw-bot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What is changed, added or deleted? (Required)

This PR updates the Chinese TiUP no-sudo documentation to clarify how resource limits take effect for the per-user systemd manager.

  • Clarify that /etc/security/limits.conf might be applied through PAM when user@<UID>.service starts, but the effective Max open files value still depends on the limits obtained by the user manager itself.
  • Add a verification step to check the effective Max open files value of the running user@${uid}.service.
  • Add a documented fallback: if the effective value is still too low, configure a system-level drop-in for user@${uid}.service with LimitNOFILE=1000000.
  • Explain that restarting user@${uid}.service stops all user services managed by that user, so existing clusters should be stopped first or handled in a maintenance window.

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • 文档
    • 补充 no-sudo 模式下文件描述符限制(Max open files)的生效机制说明。
    • 新增 Max open files 的检查方法,并提供常见问题排查与修复步骤。
    • 说明在更新系统限制配置后,需要重启对应用户服务,并复核实际生效结果。

@ti-chi-bot ti-chi-bot Bot added contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. labels Jun 23, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Hi @doc-claw-bot. Thanks for your PR.

I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot ti-chi-bot Bot added needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 23, 2026
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 23, 2026
@qiancai qiancai added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed missing-translation-status This PR does not have translation status info. labels Jun 23, 2026
@lilin90 lilin90 self-assigned this Jun 24, 2026
@lilin90 lilin90 added translation/from-docs This PR is translated from a PR in pingcap/docs. ONCALL Relates to documentation oncall. and removed translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. labels Jun 24, 2026
@lilin90

lilin90 commented Jun 24, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@ti-chi-bot ti-chi-bot Bot added ok-to-test Indicates a PR is ready to be tested. and removed needs-ok-to-test Indicates a PR created by contributors and need ORG member send '/ok-to-test' to start testing. labels Jun 24, 2026
@lilin90
lilin90 requested a review from Copilot June 24, 2026 02:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Chinese TiUP no-sudo deployment documentation to clarify how file descriptor limits (nofile) actually take effect under per-user systemd (user@<UID>.service) and to provide concrete verification and remediation steps.

Changes:

  • Explain why /etc/security/limits.conf may not fully determine the effective Max open files for the per-user systemd manager in no-sudo mode.
  • Add steps to restart user@${uid}.service after updating limits, verify the effective limit via /proc/<pid>/limits, and document a system-level drop-in fallback using LimitNOFILE=1000000.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tiup/tiup-cluster-no-sudo-mode.md Outdated
@lilin90
lilin90 requested a review from bb7133 June 24, 2026 06:56
github-actions Bot pushed a commit to doc-claw-bot/pingcap-docsite-preview that referenced this pull request Jun 27, 2026
github-actions Bot pushed a commit to doc-claw-bot/pingcap-docsite-preview that referenced this pull request Jun 27, 2026
Comment thread tiup/tiup-cluster-no-sudo-mode.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ti-chi-bot

ti-chi-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from lilin90. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@lilin90, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 40 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9b86040d-89c6-4b6a-b73d-5f1dcb410c9a

📥 Commits

Reviewing files that changed from the base of the PR and between ab96bcd and 232d425.

📒 Files selected for processing (1)
  • tiup/tiup-cluster-no-sudo-mode.md
📝 Walkthrough

Walkthrough

补充 no-sudo 模式下文件描述符限制的生效说明,并增加用户 systemd 实例的限制检查、配置和复核步骤。

Changes

no-sudo 资源限制

Layer / File(s) Summary
文件描述符限制校验与修复
tiup/tiup-cluster-no-sudo-mode.md
说明 limits.confuser@<UID>.service 资源限制的生效关系,并补充重启服务、检查 Max open files、设置 LimitNOFILE 及复核配置的流程。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested reviewers: bb7133

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed 标题准确概括了本次对 no-sudo 模式下 limits.conf 生效行为的说明更新。
Description check ✅ Passed 描述包含变更内容、适用版本和参考链接,基本覆盖了模板要求。
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lilin90 lilin90 added needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. area/tiup Indicates that the Issue or PR belongs to the area of the TiUP tool. labels Jul 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fbc91840-a9b5-47d7-85ef-5fba9b836b35

📥 Commits

Reviewing files that changed from the base of the PR and between 642d782 and dc64ed3.

📒 Files selected for processing (1)
  • tiup/tiup-cluster-no-sudo-mode.md

Comment thread tiup/tiup-cluster-no-sudo-mode.md Outdated
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ti-chi-bot ti-chi-bot Bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 27, 2026
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/tiup Indicates that the Issue or PR belongs to the area of the TiUP tool. contribution This PR is from a community contributor. first-time-contributor Indicates that the PR was contributed by an external member and is a first-time contributor. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. ok-to-test Indicates a PR is ready to be tested. ONCALL Relates to documentation oncall. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/from-docs This PR is translated from a PR in pingcap/docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants